Add documentation for the inline attribute#158348
Merged
Merged
Conversation
80 tasks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
36b776e to
6a28d0c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6a28d0c to
480d2fe
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Document the built-in `inline` attribute in the standard library using the `#[doc(attribute = "...")]` mechanism, following the existing `must_use` attribute documentation.
480d2fe to
ab4b9bf
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
Author
|
@GuillaumeGomez could you also check this PR? |
GuillaumeGomez
approved these changes
Jul 14, 2026
Member
|
Looks good to me, thanks! @bors r+ rollup |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 15, 2026
Rollup of 15 pull requests Successful merges: - #159311 (Add 1.97.1 release notes) - #156220 (Implement `VecDeque::truncate_to_range`) - #158608 (Implement `#[diagnostic::opaque]` attribute to hide backtraces of macros.) - #159168 (Fix static_mut_refs lint check logic) - #159242 (resolve: Inherit eager invocation parents) - #159256 (Account for async closures when pointing at lifetime in return type) - #159310 (cleanup: upstream dropped AMX-TF32) - #158348 (Add documentation for the `inline` attribute) - #159181 (add rustc_no_writable to mem::forget and structs it uses) - #159191 (Mark `PrivateItems` with `std_internals` unstable feature.) - #159194 (rustdoc: Fix auto trait normalization env) - #159196 (OnceCell: Improve wording in module docs) - #159289 (Fix Zulip backport command suggestion) - #159294 (renovate: don't update PRs in the merge queue) - #159305 (std: clarify available_parallelism docs for Windows 11 processor groups)
rust-timer
added a commit
that referenced
this pull request
Jul 15, 2026
Rollup merge of #158348 - valentynkit:docs-inline-attribute, r=GuillaumeGomez Add documentation for the `inline` attribute Document the built-in `inline` attribute in the standard library using the `#[doc(attribute = "...")]` mechanism, following #157957 (`must_use`). Part of #157604 r? @GuillaumeGomez Tested with `./x test library/std --doc --test-args attribute_docs`.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Jul 15, 2026
…-attributes, r=GuillaumeGomez Add documentation for the `cold` and `track_caller` attributes Adds `cold` and `track_caller`, the two code generation attributes left from my claim on the tracking issue. Both stay guide-level, with one runnable example each. For `track_caller` I used a small assert-style helper, since the attribute mainly affects which line a panic points at. `inline` is already up in rust-lang#158348. Part of rust-lang#157604 r? @GuillaumeGomez Tested with `./x test library/std --doc --test-args attribute_docs`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the built-in
inlineattribute in the standard library using the#[doc(attribute = "...")]mechanism, following #157957 (must_use).Part of #157604
r? @GuillaumeGomez
Tested with
./x test library/std --doc --test-args attribute_docs.